#!/user/bin/python
import MySQLdb
db=mySQLdb.connect("localhost","root","","std")
x=raw_input('NAME:')
y=raw_input('REGNO:')
cursor=db.cursor()
sql="insert into sd1 values('" + x + "','"+ y +"')"
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
